package com.tamecode.chapter06.sec6;

import org.springframework.context.ApplicationListener;

/**
 * @Author: Qiongchao
 * @Version: 1.0.0
 * @Date: 2023/10/11
 */
public class MailSendListener implements ApplicationListener<MailSendEvent> {

    // ①对MailSendEvent事件进行处理
    @Override
    public void onApplicationEvent(MailSendEvent event) {
        MailSendEvent mse = (MailSendEvent) event;
        System.out.println("MailSendEvent: 向" + mse.getTo() + "发送完一封邮件");
    }
}
